package com.lml.hydrogenexpertsystem.backend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lml.hydrogenexpertsystem.backend.model.entity.User;
import com.lml.hydrogenexpertsystem.backend.model.vo.LoginUserVo;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 梦龙
 * @date 2025/4/18 下午8:00
 */
public interface UserService extends IService<User> {

    /**
     * 用户注册
     *
     * @param account
     * @param password
     * @param checkPassword
     * @return
     */
    long userRegister(String account, String password, String checkPassword);

    /**
     * 获得加盐后的密码
     *
     * @param password
     * @return
     */
    String getEncryptPassword(String password);

    // 脱敏后的用户信息
    LoginUserVo userLogin(String account, String password, HttpServletRequest request);

    // 获得脱敏后的用户信息
    LoginUserVo getLoginUserVO(User user);

    // 用户登出
    Boolean userLogout(HttpServletRequest request);

    public User getLoginUser(HttpServletRequest request);
}
